//
//  ExMainViewController.swift
//  Swift-Example
//
//  Created by apang on 2018/8/8.
//  Copyright © 2018 apang.men All rights reserved.
//

import UIKit

class ExMainViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view.
//        let filePath = Bundle.main.path(forResource: "PopinSwift", ofType: "pdf", inDirectory: "Resource/Document")
//        let fileUrl:URL = URL(fileURLWithPath: filePath!)
//        do {
//            let data_:Data
//            try data_ = Data.init(contentsOf: fileUrl)
//            print(data_.count)
//        } catch let error {
//            print(error)
//        }
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        (UIApplication.shared.delegate as! AppDelegate).interfacceOrientaion = [.portrait]
    }
    
    @IBAction func pushWKWebView(_ sender: Any) {
        let viewController:ExWKWebViewController = ExWKWebViewController.init();
        self.navigationController?.pushViewController(viewController, animated: true)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
